from PyQt5.QtCore import *
from examples.example_calculator.calc_conf import *
#from calc_conf import *#--
from examples.example_calculator.calc_node_base import *
#from calc_node_base import *#--
from nodeeditor.utils import dumpException


@register_node(OP_NODE_APPEND)
class CalcNode_Append(CalcNode):
    icon = "icons/add.png"
    op_code = OP_NODE_APPEND
    op_title = "两短文本合成"
    content_label = ""
    content_label_objname = "calc_node_add"
    
    def __init__(self, scene):
        super().__init__(scene, inputs=[1,1], outputs=[1])
        self.eval()
    
    def evalImplementation(self):
        s_value = self.getInput(0).eval()
        s_value = s_value + '\n'
        s_value = s_value + self.getInput(1).eval()
        s_value = s_value + '\n'
        self.value = s_value
            
            
        self.markDirty(False)
        self.markInvalid(False)

        self.markDescendantsInvalid(False)
        self.markDescendantsDirty()

        self.grNode.setToolTip("")

        self.evalChildren()

        return self.value